package edu.uwm.capstone.util;

public class ExceptionUtil {
	public static String getExceptionMessage(Throwable paramThrowable) {
		StringBuilder localStringBuilder = new StringBuilder();
		localStringBuilder.append(paramThrowable.getClass().getSimpleName());
		if (paramThrowable.getMessage() != null) {
			localStringBuilder.append(": ");
			localStringBuilder.append(paramThrowable.getMessage());
		}
		localStringBuilder.append('\n');
		StackTraceElement[] arrayOfStackTraceElement = paramThrowable
				.getStackTrace();
		if (arrayOfStackTraceElement.length > 1)
			;
		for (int i = 0;; i++) {
			if (i >= 2)
				return localStringBuilder.toString();
			localStringBuilder.append(arrayOfStackTraceElement[i].toString());
			localStringBuilder.append('\n');
		}
	}
}